package com.mk.domain;

import com.github.d925529.apidoc.annotation.ApiField;
import org.beetl.sql.core.annotatoin.*;
import org.beetl.sql.core.mapper.BaseMapper;

import java.io.Serializable;
import java.util.List;

@Table(name = "cp_role_resource")
@SuppressWarnings("unused")
public class CpRoleResource implements Serializable {
    @AssignID
    //角色ID
    @ApiField("角色ID")
    private String roleid;

    @AssignID
    //资源ID
    @ApiField("资源ID")
    private String resourceid;


    /**
     * @return 角色ID
     */
    public String getRoleid() {
        return roleid;
    }

    /**
     * @param roleid 角色ID
     */
    public void setRoleid(String roleid) {
        this.roleid = roleid;
    }

    /**
     * @return 资源ID
     */
    public String getResourceid() {
        return resourceid;
    }

    /**
     * @param resourceid 资源ID
     */
    public void setResourceid(String resourceid) {
        this.resourceid = resourceid;
    }


    public interface Mapper extends BaseMapper<CpRoleResource> {
        @SqlStatement(type = SqlStatementType.DELETE)
        int saveRoleResource(@Param("resourceids") List<String> resourceids, @Param("roleid") String roleid);
    }
}